<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <h:form id="PyfntbpedvicomListForm">

        <p:panel header="#{myBundle.ListPyfntbpedvicomTitle}">

            <p:dataTable id="datalist" value="#{pyfntbpedvicomController.items}" var="item"
                         selectionMode="single" selection="#{pyfntbpedvicomController.selected}"
                         rowKey="#{item.pyfntbpedvicomid}"
                         paginator="true"
                         rows="5"
                         rowsPerPageTemplate="5,10,20,30"
                         >

                <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

                <p:column sortBy="#{item.pyfntbpedvicomid}" filterBy="#{item.pyfntbpedvicomid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpedvicomTitle_pyfntbpedvicomid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyfntbpedvicomid}"/>
                </p:column>
                <p:column sortBy="#{item.referencia}" filterBy="#{item.referencia}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpedvicomTitle_referencia}"/>
                    </f:facet>
                    <h:outputText value="#{item.referencia}"/>
                </p:column>
                <p:column sortBy="#{item.fechareferencia}" filterBy="#{item.fechareferencia}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpedvicomTitle_fechareferencia}"/>
                    </f:facet>
                    <h:outputText value="#{item.fechareferencia}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.descripcion}" filterBy="#{item.descripcion}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpedvicomTitle_descripcion}"/>
                    </f:facet>
                    <h:outputText value="#{item.descripcion}"/>
                </p:column>
                <p:column sortBy="#{item.observaciones}" filterBy="#{item.observaciones}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpedvicomTitle_observaciones}"/>
                    </f:facet>
                    <h:outputText value="#{item.observaciones}"/>
                </p:column>
                <p:column sortBy="#{item.scittbfadeceid.scittbfadeceid}" filterBy="#{item.scittbfadeceid.scittbfadeceid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpedvicomTitle_scittbfadeceid}"/>
                    </f:facet>
                    <h:outputText value="#{item.scittbfadeceid.scittbfadeceid}"/>
                </p:column>
                <p:column sortBy="#{item.scittbescunid.scittbescunid}" filterBy="#{item.scittbescunid.scittbescunid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpedvicomTitle_scittbescunid}"/>
                    </f:facet>
                    <h:outputText value="#{item.scittbescunid.scittbescunid}"/>
                </p:column>
                <p:column sortBy="#{item.pyfntbpedviaticid.pyfntbpedviaticid}" filterBy="#{item.pyfntbpedviaticid.pyfntbpedviaticid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPyfntbpedvicomTitle_pyfntbpedviaticid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pyfntbpedviaticid.pyfntbpedviaticid}"/>
                </p:column>
                <f:facet name="footer">
                    <p:commandButton id="createButton" icon="ui-icon-plus"   value="#{myBundle.Create}" actionListener="#{pyfntbpedvicomController.prepareCreate}" update=":PyfntbpedvicomCreateForm" oncomplete="PyfntbpedvicomCreateDialog.show()"/>
                    <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{myBundle.View}" update=":PyfntbpedvicomViewForm" oncomplete="PyfntbpedvicomViewDialog.show()" disabled="#{empty pyfntbpedvicomController.selected}"/>
                    <p:commandButton id="editButton"   icon="ui-icon-pencil" value="#{myBundle.Edit}" update=":PyfntbpedvicomEditForm" oncomplete="PyfntbpedvicomEditDialog.show()" disabled="#{empty pyfntbpedvicomController.selected}"/>
                    <p:commandButton id="deleteButton" icon="ui-icon-trash"  value="#{myBundle.Delete}" actionListener="#{pyfntbpedvicomController.delete}" update=":growl,datalist" disabled="#{empty pyfntbpedvicomController.selected}"/>
                </f:facet>

            </p:dataTable>

        </p:panel>

    </h:form>

</ui:composition>